/**
 * @version v1.0
 * @Description
 * @Author admin
 * @date 2021/7/12  14:40
 * @Copyright
 */
public class Worker {
    public String name;
    public int age;

    public Worker(String name, int age) {
        this(name);//调用第一个参数的方法
        this.name =name;
        this.age =age;
    }

    //this调用其他方法时，必须放在第一行,
    public Worker(String name) {
        this();
        this.name =name;

    }

    public Worker() {

    }
}
